package com.gs.cd.service.tenant.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

import com.diboot.core.binding.annotation.BindEntity;
import com.gs.cd.service.auth.model.AuthUser;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 *
 * </p>
 *
 * @author seven
 * @since 2020-12-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class SysTenantOwnUser implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 租户编码
     */
    @TableId(value = "tenant_code", type = IdType.AUTO)
    private String tenantCode;

    /**
     * 用户登录名
     */
    private String loginName;

    /**
     * 是否有效：租户，或项目不可以时，失效
     */
    private Boolean isValid;

    @BindEntity(entity = AuthUser.class, condition = "this.loginName=loginName")
    private AuthUser authUser;
}
